/*
                    Widget Class Definition
*/

#ifndef WIDGET_H
#define WIDGET_H

#include <string>
#include "SDL/SDL.h"

#include "../Structs.h"

using namespace std;

class Widget
{
    public:
        Widget();
        virtual ~Widget() {};

        virtual int HandleMouseDown(int iMouseX, int iMouseY) { return 0; }
        virtual int HandleMouseUp(int iMouseX, int iMouseY) { return 0; }
        virtual int HandleMouseMotion(int iMouseXREL, int iMouseYREL) { return 0; }
        virtual int HandleKeyDown(string strKeyName, Uint16 UNICODEvalue) { return 0; }

        virtual int BlitToSurface(SDL_Surface *surface) = 0;
        virtual int BlitToFrame(SDL_Surface *surface, Point FramePosition) = 0;

        void setName(string strNewName);
        string getName();

        void setVisible(bool bNewVal);
        bool getVisible();

        void setEnabled(bool bNewVal);
        bool getEnabled();

        int setFramePosition(Point NewPosition);

        void setTooltip(const string& strNewTooltip);
        string getTooltip();

    protected:
        string strName;
        string strTooltip;

        Point FramePos;

        bool bVisible, bEnabled;

};

#endif
